<div ng-if="pagedata.op=='login'" class='fui-page  fui-page-current' >
    <div class="fui-header">
		<div class="title">登陆</div>
	</div>
	<div class='fui-content' style="margin-top:2.2rem">
		<div class="fui-cell-group">
			<div class="fui-cell must">
				<div class="fui-cell-label">手机号</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的手机号"  ng-model="pagedata.item.mobile" /></div>
				<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="pagedata.mobile_code(pagedata.item.mobile,'smscode')" id="smscode">获取验证码</a></div>
			</div>
			<div class="fui-cell must ">
				<div class="fui-cell-label ">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.item.smscode" /></div>
			</div>
		</div>
	</div>
	<div class='fui-content' style="margin-top:2.7rem">
		<a href='javascript:;' ng-click="post(pagedata.item,'login')" class='btn btn-success block'>确认登陆</a>
	</div>
</div>
<div ng-if="pagedata.op=='look'" class='fui-page  fui-page-current' >
	<div class="fui-header">
		<div class="title">我的报告单</div>
	</div>
	<div class='fui-content' style="margin-top:2.2rem">
		
		<div ng-repeat="report in pagedata.report.reports">
		<div style="text-align:center">{{report.title}}</div>
		<div><img style="max-width:100%" ng-src="{{tomedia(report.image)}}"></img></div>
		</div>
		<div>
			<div style="text-align:center">医生建议</div>
			<p>{{pagedata.report.remark}}
			</p>
		</div>
	</div>
</div>
<script>
var _mobile_code_sending=false;
scope.pagedata.mobile_code=function(mobile,count_down_id){
		if(_mobile_code_sending){
			return false;
		}
		_mobile_code_sending=true;
		
		scope.tool.post('jy_report/index/send',{'mobile':mobile},function(res){
			_mobile_code_sending=false;
			if(res=='success'){
				//发送成功，开始倒计时 
				if(!count_down_id){
					
					return true;
				}
				if(typeof(count_down_id)=='string'){
					scope.tool.count_down(60,count_down_id,'秒后重新发送',function(){
						
						$('#'+count_down_id).text('重新发送');
					});
				}else if(typeof(count_down_id)=='function'){
					
					count_down_id();
				}
			}else{
				scope.tool.message('验证码发送失败！','error');
			}
		});
		
	}
</script>